home *** CD-ROM | disk | FTP | other *** search
/ Univers Mac Interactif 42 / Univers Mac Interactif - Issue 42.iso / Internet / MacHTTP 2.0 / MacHTTP Software & Docs / Tutorials / Examples / HyperCard CGI demo / CGI Demo Stack / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1994-12-19  |  2.1 KB  |  21 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>2</cardCount>
  7.     <cardID>3061</cardID>
  8.     <listID>2183</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>480</width>
  14.         <height>294</height>
  15.     </cardSize>
  16.     <script>on openStack
  17. repeat with i = 1 to the number of fields
  18. put empty into field i of card 1
  19. end repeat
  20. pass openStack
  21. end openStack
  22.  
  23.  
  24. on appleEvent class, eventID, sender
  25. if class & eventID is "WWWŒ©sdoc" then -- look for sdoc event
  26. request appleEvent data -- get the direct parameter (path args)
  27. put it into field "path args"
  28. request appleEvent data with keyword "kfor"
  29. put it into field "search args"
  30. request appleEvent data with keyword "post"
  31. put it into field "post args"
  32. request appleEvent data with keyword "meth"
  33. put it into field "method"
  34. request appleEvent data with keyword "addr"
  35. put it into field "address"
  36. request appleEvent data with keyword "user"
  37. put it into field "username"
  38. request appleEvent data with keyword "pass"
  39. put it into field "password"
  40.  
  41. -- You can duplicate the above code, substituting the addition
  42. -- keywords below to access additional MacHTTP parameters:
  43. --'kfor' - search arguments
  44. --'user' - user name
  45. --'pass' - password
  46. --'frmu' - from user
  47. --'addr' - client address
  48. --'post' - post arguments
  49. --'meth' - HTTP method
  50. --'svnm' - server name
  51. --'svpt' - server port
  52. --'scnm' - script name
  53. --'ctyp' - content type
  54. --'refr' - referer
  55. --'Agnt' - user agent
  56.  
  57. -- Do whatever processing is necessary here to handle the event,
  58. -- using the arguments provided above. Return the result of the processing
  59. -- as a string with the "reply" statement as below.
  60. --
  61.  
  62. reply "<title>HyperCard Result</title><h1>HyperCard thanks you!</h1>"
  63. else
  64. pass appleEvent
  65. end if
  66. end appleEvent</script>
  67.     <background id="2644" file="background_2644.xml" name="" />
  68.     <card id="3061" file="card_3061.xml" marked="false" name="" owner="2644" />
  69.     <card id="3946" file="card_3946.xml" marked="false" name="info" owner="2644" />
  70. </stack>
  71.